package com.munisense.webservices.javaclient;

import java.io.IOException;
import java.util.List;

import javax.xml.bind.JAXBException;

import org.xml.sax.SAXException;

import com.munisense.webservices.pojo.DOStreetLight;
import com.munisense.webservices.pojo.DOStreetLightList;
import com.munisense.webservices.pojo.DOStreetLightPropertyQuery;

/**
 * DOStreetLight Service
 * 
 * This is the StreetLight service that can be used to fetch/update (lists of)
 * DOStreetLight objects.
 * 
 * Currently it is an implementation in it it's most basic form, as a helper class
 * providing a more easy to use interface to the underlying GenericService.
 *
 */
public class DOStreetLightService extends GenericService {

	public DOStreetLightService(ServiceConf serviceConf) {
		super(serviceConf);
	}

	public DOStreetLightList getList(List<String> fieldsOverride, List<MuniFilter> filter) throws IOException, SAXException, JAXBException {
		return super.getList(DOStreetLightList.class, "DOStreetLight", fieldsOverride, filter);
	}

	public DOStreetLight update(DOStreetLight object) throws IOException, SAXException, JAXBException {
		return super.update(DOStreetLight.class, "DOStreetLight", object, Integer.valueOf(object.getId()));
	}

	public DOStreetLight get(int id, List<String> fieldsOverride) throws SAXException, JAXBException, IOException {
		return super.get(DOStreetLight.class, "DOStreetLight", id, fieldsOverride);
	}
	
	public DOStreetLightPropertyQuery propertyQuery(int id, String property, ResultQueryOptions options) throws SAXException, JAXBException, IOException {
		return super.propertyQuery(DOStreetLightPropertyQuery.class, "DOStreetLight", id, property, options);
	}	
}
